package org.desktop.web.client.project.proxy;

import org.desktop.web.client.project.service.ProjectService;
import org.desktop.web.client.project.service.ProjectServiceAsync;
import org.desktop.web.shared.domain.entities.Project;

import com.google.gwt.core.shared.GWT;
import com.google.gwt.user.client.Cookies;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.sencha.gxt.data.client.loader.RpcProxy;
import com.sencha.gxt.data.shared.loader.FilterPagingLoadConfig;
import com.sencha.gxt.data.shared.loader.PagingLoadResult;

public class RpcProjectProxy  extends
		RpcProxy<FilterPagingLoadConfig, PagingLoadResult<Project>> {

	private ProjectServiceAsync service = GWT.create(ProjectService.class);

	public RpcProjectProxy() {
		super();
	}

	@Override
	public void load(FilterPagingLoadConfig loadConfig,
			AsyncCallback<PagingLoadResult<Project>> callback) {
		service.getProjects(Cookies.getCookie("token"), loadConfig, callback);

	}

}
